import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;


public class MyListCellThing extends DefaultListCellRenderer {

	private static final long serialVersionUID = 1L;

	@Override
    
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
       
        if (list.getModel().getElementAt(2).equals("Inmuebles")) {
        	
        	//c.setBackground(index==2 | index==3 ? Color.red : isSelected ? null : null); 

        }
        
        
        
        return c;
    }
}